package Lint;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class LoginSuccessServlet extends HttpServlet {

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        HttpServletRequest hrequest = (HttpServletRequest)request;
        request.getRequestDispatcher("/loginsuccess.jsp").forward(request,response);
        String user = ( String ) hrequest.getSession().getAttribute("user");
        System.out.print("user"+user);
    }
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {

        request.setCharacterEncoding("UTF-8");
        response.setContentType("text/html;charset=utf-8");

//        String name = request.getParameter("name");
//        String pw = request.getParameter("password");

//        request.getRequestDispatcher("/login.jsp").forward(request,response);
    }
}
